home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 30
/
Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso
/
Aminet
/
gfx
/
misc
/
gnuplot-3.7src.lha
/
gnuplot-3.7src
/
gnuplot-3.7.lha
/
gnuplot-3.7
/
makefile.dj2
< prev
next >
Wrap
Makefile
|
1998-12-07
|
7KB
|
215 lines
# make file for gnuplot 3.7 / DOS / DJGPP version 2
#
# compile it by make -f makefile.dj2 in the main gnuplot directory
#
#
# AUTHORS : several ... including Edzer Pebesma <pebesma@metoor.frw.uva.nl>
# last mod. by Emmanuel Bigler <bigler@lpmo.univ-fcomte.fr>
# DATE of last mod : 1996 FEB 20
#
#
# removed atari reference and added binary demo bf_test
# cleaned up the building of doc and binary test files
# gnuplot.gih will be built now inside the docs directory like under
# UNIX. The problem is that DOS does not recognize sub-shells like
# (cd dir ; do things) inside the makefile.
# solution -> assume everything is done inside gnuplot main dir, under
# a single DOS command process
#
# install target added : will copy the executable + helpfile in a given
# directory ; customize it, see FINALDEST
#
#
# here customize where you put gnuplot executable for make install
# for simplicity the helpfile will be copied in the same dir.
# convention used here : no trailing \ for directory names
FINALDEST=c:\bin
# here customize the name of the executable
# exe file will be gp36.exe:
EXENAME = gp36
# where to place gnuplot.gih helpfile upon MAKE
# note it will be built inside gnuplot\$(HELPDEST)
# and eventually copied to FINALDEST when install
HELPDEST =docs
# name of the helpfile
HELPFILE =gnuplot.gih
# compiler
CCDIR = c:\djgpp\bin\
CC = $(CCDIR)gcc
# include directory
INCLUDE = -I.
# for svga term driver
# HBB: -finline-functions bombs out on term.c, so disable it unconditionally
TERMFLAGS = -DDJSVGA -fno-inline-functions
#
#
#just for historical purpose..
## DJGPP 1.xx:
# CFLAGS = -DMSDOS -DDJGPP -DREADLINE -DHAVE_STRNICMP -O
# LINKOPT = -lm -lpc -lgrx
## DJGPP 2.0:
# HBB : added $(OPTS) so user can
# change CFLAGS easily, without having to change makefile
CFLAGS = -DMSDOS -DDOS32 \
-DANSI_C -DSTDC_HEADERS \
-DHAVE_VALUES_H -DHAVE_UNISTD_H -DRETSIGTYPE=void \
-DHAVE_ERF -DHAVE_LGAMMA -DHAVE_GAMMA \
-DHAVE_GETCWD -DHAVE_SETLINEBUF -DHAVE_SLEEP \
-DHAVE_STRNCASECMP -DHAVE_STRNICMP -DHAVE_STRERROR \
-DHAVE_SETVBUF \
-DHAVE_TEMPNAM -DPIPES -DREADLINE \
-O $(OPTS)
LINKOPT = $(LDFLAGS) -lm -lpc -lgrx20
# HBB: removed reference to no-more-existing term/bigfig.trm
CSOURCE5 = term/ai.trm term/amiga.trm term/aed.trm \
term/cgi.trm term/djsvga.trm term/dumb.trm \
term/dxf.trm term/dxy.trm \
term/debug.trm term/eepic.trm term/epson.trm term/fig.trm \
term/hp26.trm term/hp2648.trm term/hpgl.trm \
term/hpljii.trm term/metafont.trm\
term/apollo.trm term/gpr.trm term/hppj.trm term/compact.c
CSOURCE6 = term/impcodes.h term/imagen.trm term/next.trm term/object.h \
term/iris4d.trm term/kyo.trm term/latex.trm term/mif.trm \
term/pbm.trm term/pc.trm
CSOURCE7 = term/post.trm term/qms.trm term/regis.trm term/sun.trm \
term/t410x.trm term/tek.trm term/texdraw.trm term/unixpc.trm \
term/unixplot.trm term/v384.trm term/vws.trm term/x11.trm term/xlib.trm
OBJ1 = bitmap.o command.o contour.o eval.o graphics.o graph3d.o hidden3d.o util3d.o
OBJ2 = help.o internal.o misc.o parse.o plot.o plot2d.o plot3d.o readline.o
OBJ3 = scanner.o set.o show.o specfun.o standard.o stdfn.o term.o time.o util.o
OBJ4 = version.o binary.o interpol.o fit.o matrix.o datafile.o alloc.o
CSOURCES = $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
OBJS = $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4)
.c.o:
$(CC) -c $(CFLAGS) $(INCLUDE) $<
%:: RCS/%
$(patsubst $@-noexist,$(CO) $(COFLAGS) $< $@, \
$(filter-out $@,$(firstword $(wildcard $@) $@-noexist)))
all: $(EXENAME).exe $(HELPDEST)\$(HELPFILE) demo\binary?.
# -s performs the coff2exe step implicitly (?)
# HBB: that's plain wrong: -s means 'strip executable',
# and stubify (formerly called stubify) is now always done
# automatically in the link step. I changed this so you
# get a debuggable gp36, but a stripped gp36.exe
$(EXENAME).exe : $(OBJS)
$(CC) -o $(EXENAME) $(OBJS) $(LINKOPT)
objcopy --strip-all $(EXENAME) $(EXENAME).exe
stubify $(EXENAME).exe
#HBB: I think that message is superfluous, and maybe even confusing
# for new users of DJGPP V2, who never used DJGPP V1 at all.
# @echo.
# @echo Rem: with djgpp v.2, you do not need go32 any longer to run gnuplot
# @echo.
# This used to copy go32 to the exe file.. under v1.xx
# obsolete under djgpp v. 2.
#
#$(EXENAME).exe : $(OBJS)
# $(CC) -o $(EXENAME) $(OBJS) $(LINKOPT)
# strip $(EXENAME)
# copy /b $(CCDIR)\$(EXENAME).exe+$(EXENAME) $(EXENAME).exe
# del $(EXENAME)
command.o: command.c plot.h setshow.h help.h
$(CC) -c $(CFLAGS) $(INCLUDE) -DHELPFILE=\"$(HELPFILE)\" command.c
show.o: show.c plot.h setshow.h
$(CC) -c $(CFLAGS) $(INCLUDE) -DHELPFILE=\"$(HELPFILE)\" $<
term.o: term.c term.h plot.h set.c show.c bitmap.h $(CSOURCES)
$(CC) -c $(CFLAGS) $(INCLUDE) $(TERMFLAGS) -Iterm term.c
$(OBJS): plot.h
command.o help.o misc.o: help.h
command.o graphics.o graph3d.o hidden3d.o util3d.o misc.o plot.o set.o show.o term.o interpol.o: setshow.h
command.o fit.o matrix.o: fit.h
fit.o matrix.o: matrix.h
bitmap.o term.o: bitmap.h
#HBB 961201: add dependencies to trigger RCS checkout if necessary:
plot.h: protos.h
protos.h: alloc.h
EMAIL=broeker@physik.rwth-aachen.de
version.o: version.c
$(CC) -c -DCONTACT=\"$(EMAIL)\" $(CFLAGS) $(INCLUDE) version.c
# convert gnuplot.doc to gnuplot.gih
$(HELPDEST)\$(HELPFILE): .\docs\doc2gih.exe .\docs\gnuplot.doc
.\docs\doc2gih docs/gnuplot.doc > $(HELPDEST)\$(HELPFILE)
.\docs\doc2gih.exe: .\docs\doc2gih.c .\docs\termdoc.c $(CSOURCES)
$(CC) $(CFLAGS) $(INCLUDE) $(TERMFLAGS) -Iterm -o ./docs/doc2gih ./docs/doc2gih.c ./docs/termdoc.c
coff2exe ./docs/doc2gih
# now for the demo bin
demo\binary?.: bf_test.exe
bf_test
copy binary? demo\binary?
del binary?
bf_test.o:
$(CC) $(CFLAGS) -c bf_test.c
bf_test.exe: bf_test.o binary.o alloc.o
$(CC) $(CFLAGS) bf_test.o binary.o alloc.o -lm -o bf_test
coff2exe bf_test
# now install things and create a .bat file to make things easier
install: all
copy $(EXENAME).exe $(FINALDEST)
copy $(HELPDEST)\$(HELPFILE) $(FINALDEST)
#HBB: if at all, this batch-file should only be generated by a
#separate target, like 'install-bat'. Besides, it doesn't work,
#as is, because DOS always executes foo.exe before even looking for
#a foo.bat
# del $(EXENAME).bat
# echo @echo off > $(EXENAME).bat
# echo SET GNUHELP= $(FINALDEST)\$(HELPFILE) >> $(EXENAME).bat
# echo SET GNUPLOT= $(FINALDEST) >> $(EXENAME).bat
# echo $(FINALDEST)\$(EXENAME).exe %1 %2 %3 %4 %5 %6 >> $(EXENAME).bat
# echo SET GNUHELP= >> $(EXENAME).bat
# echo SET GNUPLOT= >> $(EXENAME).bat
# copy $(EXENAME).bat $(FINALDEST)
# clean target - remove all temp files, but leave executable intact
clean:
del *.o
del $(EXENAME)
del .\docs\doc2gih
del .\docs\doc2gih.exe
del bf_test
del bf_test.exe
# realclean target - remove all files created by the makefile
realclean: clean
del $(EXENAME).exe
del $(HELPDEST)\$(HELPFILE)
del .\demo\binary1
del .\demo\binary2
del .\demo\binary3
del .\demo\fit.log
del .\demo\soundfit.par
#####
## END OF GNUPLOT 3.7 MAKEFILE FOR DJGPP V2
#####